<template>
  <view>
    <view class="cu-bar bg-white margin-top-xs">
      <view class="action sub-title">
        <text class="text-xl text-bold text-shadow text-custom">我的收益</text>
        <text class="text-ABC text-custom">EARNINGS</text>
      </view>
      <view class="action" @click="redirectUserStatstics">
        <text class="text-lg text-shadow text-custom"> 更多>> </text>
      </view>
    </view>
    <view class='padding flex text-center text-grey bg-white shadow-warp-my'>
      <view class='flex flex-sub flex-direction solid-right'>
        <view class="text-xxl text-custom">{{ stastic.totalGroupVerifPrice }}</view>
        <view class="margin-top-sm text-orange">
          <text class='cuIcon-hot' ></text> 核销金额</view>
      </view>
      <view class='flex flex-sub flex-direction solid-right'>
        <view class="text-xxl text-custom ">{{stastic.wechatPrice}}</view>
        <view class="margin-top-sm text-orange">
          <text class='cuIcon-evaluate'></text> 提现金额</view>
      </view>
      <view class='flex flex-sub flex-direction'>
        <view class="text-xxl text-custom">{{stastic.verifyCount}}</view>
        <view class="margin-top-sm text-orange">
          <text class='cuIcon-like'></text> 核销次数</view>
      </view>
    </view>
  </view>

<!--  <view>-->
<!--    <view class="flex align-center">-->
<!--      <view class="flex-su padding-lg margin-xs">我的收益</view>-->
<!--      <view class="flex-twice padding-sm margin-xs "></view>-->
<!--      <view class="flex-treble padding-lg margin-xs text-right leftView" @tap="toMyIncome">查看更多>&nbsp;&nbsp;&nbsp;</view>-->
<!--    </view>-->
<!--    <view class="flex solid-bottom align-center">-->
<!--      <view class="flex-sub margin-xs">-->
<!--        <view class="syView">-->
<!--          <view class="szView">-->
<!--            10000-->
<!--          </view>-->
<!--          <view class="tsView">-->
<!--            本月累计多少(元)-->
<!--          </view>-->
<!--        </view>-->
<!--      </view>-->
<!--      <view class="flex-sub margin-xs">-->
<!--        <view class="syView">-->
<!--          <view class="szView">-->
<!--            90000-->
<!--          </view>-->
<!--          <view class="tsView">-->
<!--            预计收益多少(元)-->
<!--          </view>-->
<!--        </view>-->
<!--      </view>-->
<!--    </view>-->

<!--    <view class="flex align-center">-->
<!--      <view class="flex-su padding-lg margin-xs">我的团队</view>-->
<!--      <view class="flex-twice padding-sm margin-xs "></view>-->
<!--      <view class="flex-treble padding-lg margin-xs text-right leftView" @tap="myTeam">查看更多>&nbsp;&nbsp;&nbsp;</view>-->
<!--    </view>-->
<!--    <view class="flex solid-bottom align-center">-->
<!--      <view class="flex-sub margin-xs">-->
<!--        <view class="syView">-->
<!--          <view class="szView">-->
<!--            10000-->
<!--          </view>-->
<!--          <view class="tsView">-->
<!--            团队成员-->
<!--          </view>-->
<!--        </view>-->
<!--      </view>-->
<!--      <view class="flex-sub margin-xs">-->
<!--        <view class="syView">-->
<!--          <view class="szView">-->
<!--            90000-->
<!--          </view>-->
<!--          <view class="tsView">-->
<!--            团队订单-->
<!--          </view>-->
<!--        </view>-->
<!--      </view>-->
<!--      <view class="flex-sub margin-xs">-->
<!--        <view class="syView">-->
<!--          <view class="szView">-->
<!--            90000-->
<!--          </view>-->
<!--          <view class="tsView">-->
<!--            团队金额(元)-->
<!--          </view>-->
<!--        </view>-->
<!--      </view>-->
<!--    </view>-->
<!--  </view>-->

</template>

<script setup lang="ts">
import {onReachBottom, onLoad, onShow} from "@dcloudio/uni-app";
import {ref, onMounted, reactive, toRaw, computed} from "vue";
import {userstastics} from '@/common/api/user'

import {useStore} from "@/common/store";
const store = useStore();

const userId = computed(() => store.userId)
const stastic = ref({})

const initStastic = () => {
  userstastics(userId.value||0).then(res => {
    stastic.value = res.data;
  })
}

const redirectUserStatstics =() => {
  uni.navigateTo({
    url: `/pages/home/verifyOrderList`
  })

}

onShow(() => {
  initStastic();
})

</script>

<style lang="scss" scoped>
</style>
